import { gEventTonwebCreate } from "./IpcParams"


export function registerIpcNotify(store) {
  window.tonwebAPI.onNotify((ipcParams) => {
    const {event, params} = ipcParams
    if (event == gEventTonwebCreate) {
      handleCreateWallet(store, params)
    }
  })
}

function handleCreateWallet(store, walletList) {
  store.dispatch("linkWallets", walletList)
}